<?php
# RAMS unittest runner.
# Copyright (C) 2010 rambla.be
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


# credentials and other data dependant of Svr location
# --------------------------------------------------

define('SUPERUSER', 'xxx');
define('SUPERPWD', 'xxx');
define('BASE', 'http://rams.cdn01.rambla.be/');
define('NORMAL_USER', 'xxx');
define('NORMAL_PWD', 'xxx');
define('HIDDEN_FILE', '.htpasswd');

# testdata (independant of Svr location)
# --------------------------------------
define('USER', 'unittest');
define('PWD', 'unittest');
define('EMAIL', 'unittest@rambla.be');

define('HTTP_VOLUME', 2.000000000000);
define('FTP_VOLUME', 1.000000000000);

if (! defined('SIMPLE_TEST')) {
    define('SIMPLE_TEST', 'unittest/simpletest/');
}
require_once(SIMPLE_TEST . 'unit_tester.php');
require_once(SIMPLE_TEST . 'reporter.php');

require_once 'RawsClient/Raws.php';
require_once 'RawsClient/Raws/Rams.php';
require_once 'RawsClient/Raws/Rams/TrafficQuery.php';

$test = &new GroupTest('All tests');

if (! defined('UNIT_TESTS')) {
    define('UNIT_TESTS', 'unittest/rams_unittests/');
}
require_once(UNIT_TESTS . 'rams_traffic_test.php');
$test->addTestCase(new RamsTrafficTest());
require_once(UNIT_TESTS . 'rams_pagination_test.php');
$test->addTestCase(new RamsPaginationTest());

$test->run(new HtmlReporter());
